package com.scsj.supermarket.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.scsj.supermarket.R;
import com.scsj.supermarket.bean.RecommendBean;

import java.util.List;

/**
 * 向你推荐
 */

public class RecommendForYouAdapter extends BaseQuickAdapter<RecommendBean,BaseViewHolder> {
    public RecommendForYouAdapter(List  data) {
        super(R.layout.item_recommend_layout,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, RecommendBean item) {
        helper.setImageResource(R.id.icon_iv,item.getImg());
        helper.setText(R.id.name_tv,item.getName());
        helper.setText(R.id.price_tv,item.getPrice());
        helper.setVisible(R.id.same_tv,true);
    }
}
